package com.jeecms.pay.virtual;

import com.jeecms.pay.constant.InnerExceptionEnum;
import com.jeecms.pay.constant.PayResultEnum;
import com.jeecms.pay.model.PayContext;
import com.jeecms.pay.model.PayPara;
import com.jeecms.pay.model.PayResult;
import com.jeecms.pay.util.ExceptionUtil;

/**
 * 提供伪实现
 * 
 * @author web
 * 
 */
public class PayVirtual {

	public static void execute(PayContext context) throws Exception {
		switch (context.getPayServiceEnum()) {
		case pay:
			PayResult result = (PayResult) context.getResult();
			PayPara para = (PayPara) context.getPayInputPara();
			result.setGameEntity(para.getGameEntity());
			result.setPayCountryEnum(para.getPayCountryEnum());
			result.setPayGoalEnum(para.getPayGoalEnum());
			result.setPayTypeEnum(para.getPayTypeEnum());
			result.setPayResultEnum(PayResultEnum.success);
			break;
		default:
			ExceptionUtil.throwServerEx("", context, InnerExceptionEnum.no_implements, null);
		}
	}

	private PayVirtual() {

	}
}
